package com.itheima.thread.atomic.demo03;

public class VolatileAtomicThread implements Runnable {

    private int count = 0;
    private static Object object = new Object();

    @Override
    public void run() {
        for (int i = 0; i < 100; i++) {
            synchronized (object) {
                count++;
                System.out.println(Thread.currentThread().getName() + ",," + count);
            }
        }
    }
}
